<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/bizappproject/daojiao/daojiaoGD.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/bizappproject/daojiao/daojiaoGD.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "daojiaoGD",
        setup() {
            const table = ref({
                key: "Id",
                footer: "Foots",
                cnName: "工单管理",
                name: "daojiao/daojiaoGD",
                newTabEdit: false,
                url: "/daojiaoGD/",
                sortName: "Id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"schedule_id":"","state":""});
            const searchFormOptions = ref([[{"title":"计划单号","field":"schedule_id","type":"like"},{"dataKey":"stateDJ","data":[],"title":"状态","field":"state","type":"select"}]]);
            const columns = ref([{field:"schedule_id",title:"计划单号",type:"string",width:80,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"name",title:"生产单号",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"raw_lot_id",title:"投料批次",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"grade",title:"性能",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"plating",title:"镀层",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"lot_ids",title:"投料批次",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"prodcut_spec",title:"产品型号",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"raw_resume_weight",title:"发料重量",type:"decimal",width:50,showOverflowTooltip:true,align:"left"},
                       {field:"product_qty",title:"数量",type:"decimal",width:50,showOverflowTooltip:true,align:"left"},
                       {field:"product_id",title:"产品",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"state",title:"状态",type:"string",bind:{ key:"stateDJ",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"quality_judge",title:"质量判定",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效(0:否,1:是)",type:"int",width:120,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:80,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建人ID",type:"bigint",width:120,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人名",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改人ID",type:"bigint",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人名",type:"string",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:120,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Id",title:"键",type:"bigint",width:120,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"}]);
            const detail = ref(  {
                    cnName: "批次拆分",
                    table: "daojiaogd_gz",
                    columns: [{field:"schedule_id",title:"计划单号",type:"string",width:100,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"little_lot",title:"小批次",type:"string",width:100,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"name",title:"生产单号",type:"string",width:100,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"raw_lot_id",title:"所属批次",type:"string",width:100,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"per_qty",title:"每批数量",type:"decimal",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"jingdu",title:"生产进度",type:"string",width:300,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"device",title:"所属设备",type:"string",width:100,edit:{type:"selectTable"},showOverflowTooltip:true,align:"left"},
                       {field:"tech",title:"工艺名称",type:"string",width:100,edit:{type:"selectTable"},showOverflowTooltip:true,align:"left"},
                       {field:"current_state",title:"当前状态",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:100,edit:{type:"textarea"},showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建人ID",type:"bigint",width:90,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人名",type:"string",width:90,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:90,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改人ID",type:"bigint",width:90,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人名",type:"string",width:90,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:90,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Id",title:"键",type:"bigint",width:90,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效(0:否,1:是)",type:"int",width:90,hidden:true,require:true,showOverflowTooltip:true,align:"left"}],
                    sortName: "Id",
                    key: "Id"
                                            });
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
